package com.zbkj.admin.controller.merchant.v2;

import com.zbkj.dal.base.result.CommonResult;
import com.zbkj.dal.pojo.request.order.merchant.AdminMerchantOfflineOrderCreateRequest;
import com.zbkj.service.service.order.merchant.AdminMerchantOfflineOrderV2Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wangzhengyan
 * @date 2024/4/12 2:52 PM
 */
@Api(tags = "商户后台-订单-线下订单")
@RestController
@RequestMapping("api/admin/merchant/order/offline")
public class MerchantOfflineOrderV2Controller {

    @Resource
    private AdminMerchantOfflineOrderV2Service adminMerchantOfflineOrderV2Service;

    // 创建订单
    @ApiOperation(value = "商户端创建线下订单") //配合swagger使用
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    public CommonResult<Boolean> createOrder(@RequestBody AdminMerchantOfflineOrderCreateRequest request) {
        return CommonResult.success(adminMerchantOfflineOrderV2Service.createOfflineOrder(request));
    }


}
